package com.im.partchat.adapter.tree;

import com.im.partchat.bean.Department;
import com.im.partchat.bean.User;

import java.util.List;

public class TreeElement {

    /**
     * 人员信息
     */
    private User person;
    /**
     * 部门信息
     */
    private Department dept;
    /**
     * 是否有子节点
     */
    private boolean hasChild = false;
    /**
     * 级别
     */
    private int level;
    /**
     * 是否是部门，true是单位，false是部门
     */
    private boolean isDept = false;
    /**
     * 子节点
     */
    private List<TreeElement> children;

    /**
     * 是否展开
     */
    private boolean expanded = false;

    /**
     * 是否已经填充子节点
     */
    private boolean isFillChildren = false;

    /**
     * 子节点的父节点
     */
    private TreeElement parentNode;

    /**
     *是否已经选中
     */
    private boolean isChoosed = false;

    private boolean isEnable = true;

    public User getPerson() {
        return person;
    }

    public void setPerson(User person) {
        this.person = person;
    }

    public Department getDept() {
        return dept;
    }

    public void setDept(Department dept) {
        this.dept = dept;
    }

    public boolean isHasChild() {
        return hasChild;
    }

    public void setHasChild(boolean hasChild) {
        this.hasChild = hasChild;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public boolean isDept() {
        return isDept;
    }

    public void setDept(boolean isDept) {
        this.isDept = isDept;
    }

    public List<TreeElement> getChildren() {
        return children;
    }

    public void setChildren(List<TreeElement> children) {
        this.children = children;
    }

    public boolean isExpanded() {
        return expanded;
    }

    public void setExpanded(boolean expanded) {
        this.expanded = expanded;
    }

    public boolean isFillChildren() {
        return isFillChildren;
    }

    public void setFillChildren(boolean isFillChildren) {
        this.isFillChildren = isFillChildren;
    }

    public boolean isChoosed() {
        return isChoosed;
    }

    public void setChoosed(boolean isChoosed) {
        this.isChoosed = isChoosed;
    }

    public boolean isEnable() {
        return isEnable;
    }

    public void setEnable(boolean isEnable) {
        this.isEnable = isEnable;
    }

    public TreeElement getParentNode() {
        return parentNode;
    }

    public void setParentNode(TreeElement parentNode) {
        this.parentNode = parentNode;
    }
}
